<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>资讯图片</title>
</head>
<body>
<form action="<%=request.getContextPath()%>/management/news.htm?method=uploadPicture" method="post" enctype="multipart/form-data">
	<div style="width:400px;height:300px;display:block;">
		<img width="400" height="300" src="<%=request.getContextPath()%>/management/news.htm?method=getPicture&newsId=${requestScope.newsId}"></img>
	</div>
	<div style="width:600px;height:30px;display:block;">
		<div style="width:auto;height:auto;display:inline;float:left;">
			<input type="file" size=30 height="20" name="image"/>
		</div>
		<div style="width:auto;height:auto;display:inline;float:left;">
			<input type="submit" value="上传图片"/>
		</div>
		<div style="width:auto;height:auto;display:inline;float:left;">
			<input type="button" value="删除图片" onclick="remove()"/>
		</div>
	</div>
	<input type="hidden" value="${newsId}" name="newsId"/>
</form>
<form action="<%=request.getContextPath()%>/management/news.htm?method=deletePicture" method="post" id="ifrDelete">
	<input type="hidden" value="${newsId}" name="newsId"/>
</form>
<script type="text/javascript">
	function remove(){
		document.getElementById('ifrDelete').submit();
		};
</script>
</html>